package com.day0913;

import java.util.Arrays;

public class Text5 {
    public static void main(String[] args) {
        int[] nums = {14,12,25,18,10};
        int temp;
        //冒泡排序 降序
        for(int i = 0; i < nums.length - 1;i ++){
            for(int j = 0; j < nums.length - 1 - i; j ++){
                if (nums[j] < nums[j + 1]) {//升序 小于号改成大于号
                    temp = nums[j];
                    nums[j] = nums[j + 1];
                    nums[j + 1] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(nums));
    }
}
